#ifndef LAYOUT_PROPERTY_H
#define LAYOUT_PROPERTY_H


class LayoutProperty
{
public:
	LayoutProperty();
	~LayoutProperty();

	void Layout();
	MGUI_Layout * GetLayout() { return mLayout; }

protected:
	MGUI_Layout * mLayout;

	MGUI_EditBox * mEditBox_Name;
	MGUI_EditBox * mEditBox_Rect;
	MGUI_EditBox * mEditBox_Order;
	MGUI_Widget * mWidget_Color;

	MGUI_ComboBox * mComboBox_HAlign;
	MGUI_ComboBox * mComboBox_VAlign;

	MGUI_ComboBox * mComboBox_Enable;
	MGUI_ComboBox * mComboBox_PickFlag;

protected:
	void OnNameChanged_(MGUI_Widget *);
	void OnRectChanged_(MGUI_Widget *);
	void OnOrderChanged_(MGUI_Widget *);
	void OnColorChanged_();
	void OnAlignChanged_(int _index);
	void OnEnableChanged_(int _index);
	void OnPickFlagChanged_(int _index);

	void OnEditWidgetChanged_(MGUI_Widget * _widget);
	void OnEditRectChanged_(MGUI_Rect rect);

protected:
	tListener1<LayoutProperty, MGUI_Widget *> OnNameChanged;
	tListener1<LayoutProperty, MGUI_Widget *> OnRectChanged;
	tListener1<LayoutProperty, MGUI_Widget *> OnOrderChanged;
	tListener0<LayoutProperty> OnColorChanged;
	tListener1<LayoutProperty, int> OnHAlignChanged;
	tListener1<LayoutProperty, int> OnVAlignChanged;
	tListener1<LayoutProperty, int> OnEnableChanged;
	tListener1<LayoutProperty, int> OnPickFlagChanged;

	tListener1<LayoutProperty, MGUI_Widget *> OnEditWidgetChanged;
	tListener1<LayoutProperty, MGUI_Rect> OnEditRectChanged;
};


#endif